package com.dnjn.happiness.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dnjn.happiness.biz.domain.Advice;
import com.dnjn.happiness.biz.domain.AdviceVo;
import com.dnjn.happiness.biz.domain.dto.StatisticalAnalysisDTO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisAppriseVO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 建议 Mapper 接口
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface AdviceMapper extends BaseMapper<Advice> {


    List<Long> selectTagIdFromUserTag(Long userId);

    List<Advice> selectAdviceInTagIds(List<Long> tagIds);

    Page<AdviceVo> selectPageX(@Param("dto") Advice domain, Page page);

    int UpdateOper(@Param("operUserId") Long operUserId, @Param("adviceId") Long adviceId);

    int upDateAdviceStatusById(@Param("adviceId") Long adviceId, @Param("thumsCount") Long thumsCount);

    List<Advice> selectByAdviceId(Long adviceId);

    Integer getAdviceThumpsById(Long userId);

    Advice selectAdviceById(Long adviceId);

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisAdvice(@Param("adviceTagsId") Long adviceTagsId, @Param("count") Integer count, @Param("symbol") String symbol, Page page);

    List<StatisticalAnalysisVO> selectStatisticalAnalysisAdviceList(@Param("vo") StatisticalAnalysisAppriseVO vo);

    Double modelUp(@Param("userId") Long userId, @Param("time") String time) ;

    Double modelOper(@Param("userId") Long userId, @Param("time") String time);

    List<StatisticalAnalysisVO> selectStatistical(@Param("dto") StatisticalAnalysisDTO dto, @Param("deptId") Long deptId);


    Page<AdviceVo> getPage(@Param("dto") Advice domain, Page page);
}
